package com.lighting.lightingservice.mapper;

import com.lighting.lightingservice.dto.Image;
import com.lighting.lightingservice.dto.Video;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ImageMapper {

    @Select("""
            select id, name, url
            from image
            """)
    List<Image> findAll();

    @Insert("""
            insert into image(name, url)
            values (#{name}, #{url} )
            """)
    void insertImage(@Param("name") String n, @Param("url") String u);

    @Delete("""
            delete from image where name=#{name}
            """)
    void deleteImage(String name);
}
